<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="{{ static_url('templates/style.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ static_url('templates/reset.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ static_url('templates/invalid.css') }}" media="screen" rel="stylesheet" type="text/css" />
<title>无线后台PID管理（统计）</title>
<SCRIPT LANGUAGE="Javascript" SRC="/static/templates/js/jquery-1.7.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
		var os="{{p_os}}"
		var factory="{{p_factory}}"
		var brand="{{p_brand}}"
		var mode="{{p_mode}}"
		$(document).ready(function(){
			$("#os").val(os)
			$("#factory").val(factory)
			$("#brand").val(brand)
			$("#mode").val(mode)
			
			$(".main-content tr").mouseover(function(){ //如果鼠标移到class为stripe_tb的表格的tr上时，执行函数
			$(this).addClass("over");}).mouseout(function(){ //给这行添加class值为over，并且当鼠标一出该行时执行函数
			$(this).removeClass("over");}) //移除该行的class
			$(".main-content tr:even").addClass("alt"); //给class为stripe_tb的表格的偶数行添加class值为alt
		});
</SCRIPT>
</head>
<body>
<h3>无线后台PID管理（统计）</h3>

<form name='frmUpdate' action="/pid/manage">
<select id="os" name="os">
	<option value="">操作系统</option>
	{% for key, value in os.items() %}
	<option value="{{value}}">{{key}}</option>
	{% end%}
</select>
<select id="factory" name="factory">
	<option value="">厂商</option>
	{% for key, value in factory.items() %}
	<option value="{{key}}">{{value}}</option>
	{% end%}
</select>
<select id="brand" name="brand">
	<option value="">终端类型</option>
	{% for key, value in brand.items() %}
	<option value="{{key}}">{{value}}</option>
	{% end%}
</select>
<select id="mode" name="mode">
	<option value="">合作模式</option>
	{% for key, value in mode.items() %}
	<option value="{{key}}">{{value}}</option>
	{% end%}
</select>
<input type='submit' value='查询' name='btnPie' />		
</form>

<a href="/pid/manage?page={{page['first']}}&os={{p_os}}&factory={{p_factory}}&brand={{p_brand}}&mode={{p_mode}}">首页</a>
<a href="/pid/manage?page={{page['previous']}}&os={{p_os}}&factory={{p_factory}}&brand={{p_brand}}&mode={{p_mode}}">上一页</a>
<a href="/pid/manage?page={{page['next']}}&os={{p_os}}&factory={{p_factory}}&brand={{p_brand}}&mode={{p_mode}}">下一页</a>
<a href="/pid/manage?page={{page['last']}}&os={{p_os}}&factory={{p_factory}}&brand={{p_brand}}&mode={{p_mode}}">尾页</a>
<div id="main-content">
<div class="content-box">
<table class="main-content">
<tbody>
<tr><th>Pid</th><th>操作系统</th><th>厂商</th><th>终端类型</th><th>合作模式</th></tr>
</tbody>
{% for i in range(len(pid_arr))%}
	<tr>
	<td align='center'>{{pid_arr[i]['pid']}}</td>
    <td align='center'>{{pid_arr[i]['os_id']}}</td>
    <td align='center'>{{pid_arr[i]['f_id']}}</td>
    <td align='center'>{{pid_arr[i]['brand']}}</td>
    <td align='center'>{{pid_arr[i]['mode']}}</td>
    </tr>
{% end%}
</table>
</div>
</div>

</body>
</html>
